<template>
  <div>
    <div @click="loginOut">退出登录</div>
  </div>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  data () {
    return {

    }
  },
  methods: {
    ...mapMutations(['removeToken','removeUser']),

    loginOut () {
      this.removeToken()
      this.removeUser()
      this.$cookies.remove('token')
      this.$router.replace('/login')
    }
  }
}
</script>

<style lang='less' scoped></style>